<template>
  <el-form ref="formRef" :model="form" label-position="top" :label-width="140">
    <div class="grid grid-cols-2 gap-x-3 my-3">
      <div>
        <strong>sku: </strong> {{ form.sku }}
      </div>
      <div>
        <strong>特采数量: </strong> {{ form.process_num }}
      </div>
    </div>
    <div>是否要确认该sku的不良品特采入库？</div>
  </el-form>
</template>

<script setup>
const props = defineProps({
  modelValue: { type: Object, default: () => ({}) },
  options: { type: Object, default: () => ({}) },
})
const emit = defineEmits(['update:modelValue'])
const form = computed({
  get() {
    return props.modelValue
  },
  set(val) {
    emit('update:modelValue', val)
  }
})
const formRef = ref()
const validate = async () => await formRef?.value.validate(res => res)
defineExpose({ validate })
</script>